import { defineStore } from 'pinia'

export const useTagStore = defineStore('tag', {
  state: () => ({
    listMap: new Map()
  }),
  getters: {
    getMap(state) {
      return state.listMap
    }
  },
  actions: {
    init(data) {
      data.forEach((item) => {
        this.listMap.set(item.id.toString(), item.tagName)
      })
    }
  }
})
